<template>
  <div class="leftnav">
    <div class="leftnav-title">
      <strong><span class="icon-list"></span>首页</strong>
    </div>
      <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose">
        <!--个人中心-->
        <el-submenu index="1">
          <template slot="title">
            <i class="el-icon-location"></i>
            <span>个人中心</span>
          </template>
          <el-menu-item-group>
            <template slot="title">个人信息</template>
            <el-menu-item index="1-1"><router-link to="/person_info">查看信息</router-link></el-menu-item>
            <el-menu-item index="1-2"><router-link to="/person_info">修改信息</router-link></el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
            <template slot="title">日程管理</template>
            <el-menu-item index="1-3"> <router-link to="/signin_list">打卡记录</router-link></el-menu-item>
            <el-menu-item index="1-7"> <router-link to="/leave_add">请假申请</router-link></el-menu-item>
            <el-menu-item index="1-7"> <router-link to="/leave_list">请假历史</router-link></el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
            <template slot="title">消息管理</template>
            <el-menu-item index="1-4"><router-link to="/message_list">消息列表</router-link></el-menu-item>
            <el-menu-item index="1-5"><router-link to="/goods_add">新建消息</router-link></el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
            <template slot="title">修改密码</template>
            <el-menu-item index="1-6"><router-link to="/goods_list">修改密码</router-link></el-menu-item>
          </el-menu-item-group>
        </el-submenu>
        <!--人事管理-->
        <el-submenu index="2">
          <template slot="title">
            <i class="el-icon-location"></i>
            <span>人事管理</span>
          </template>
          <el-menu-item-group>
            <template slot="title">员工管理</template>
            <el-menu-item index="2-1"><router-link to="/category_manage">员工管理</router-link></el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
            <template slot="title">考勤管理</template>
            <el-menu-item index="2-2"> <router-link to="/goods_list">考勤管理</router-link></el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
            <template slot="title">工资管理</template>
            <el-menu-item index="2-3"><router-link to="/goods_list">工资管理</router-link></el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
            <template slot="title">事务管理</template>
            <el-menu-item index="2-4"><router-link to="/business_list">待办事务</router-link></el-menu-item>
          </el-menu-item-group>
        </el-submenu>
        <!--会议管理-->
        <el-submenu index="3">
          <template slot="title">
            <i class="el-icon-location"></i>
            <span>会议管理</span>
          </template>
          <el-menu-item-group>
            <template slot="title">会议申请</template>
            <el-menu-item index="3-1"><router-link to="/category_manage">会议申请</router-link></el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
            <template slot="title">会议申请</template>
            <el-menu-item index="3-2"> <router-link to="/goods_list">会议申请</router-link></el-menu-item>
          </el-menu-item-group>
        </el-submenu>
        <!--权限管理-->
        <el-submenu index="4">
          <template slot="title">
            <i class="el-icon-location"></i>
            <span>权限管理</span>
          </template>
          <el-menu-item-group>
            <template slot="title">用户管理</template>
            <el-menu-item index="4-1"><router-link to="/category_manage">用户管理</router-link></el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
            <template slot="title">部门管理</template>
            <el-menu-item index="4-2"> <router-link to="/goods_list">部门管理</router-link></el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
            <template slot="title">角色管理</template>
            <el-menu-item index="4-3"><router-link to="/goods_list">角色管理</router-link></el-menu-item>
          </el-menu-item-group>
        </el-submenu>
        <!--公告管理-->
        <el-submenu index="5">
          <template slot="title">
            <i class="el-icon-location"></i>
            <span>公告管理</span>
          </template>
          <el-menu-item-group>
            <template slot="title">公告列表</template>
            <el-menu-item index="5-1"><router-link to="/notice_list">公告列表</router-link></el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
            <template slot="title">新增公告</template>
            <el-menu-item index="5-2"> <router-link to="/notice_add">新增公告</router-link></el-menu-item>
          </el-menu-item-group>
        </el-submenu>
      </el-menu>
  </div>
</template>

<script>
  export default {
    name: "Menu",
    methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      }
    }
  }
</script>

<style scoped>
</style>
